function cellInfo = WorkState_Bus(varargin) 
% WORKSTATE_BUS returns a cell array containing bus object information 
% 
% Optional Input: 'false' will suppress a call to Simulink.Bus.cellToObject 
%                 when the MATLAB file is executed. 
% The order of bus element attributes is as follows:
%   ElementName, Dimensions, DataType, Complexity, SamplingMode, DimensionsMode, Min, Max, DocUnits, Description 

suppressObject = false; 
if nargin == 1 && islogical(varargin{1}) && varargin{1} == false 
    suppressObject = true; 
elseif nargin > 1 
    error('Invalid input argument(s) encountered'); 
end 

cellInfo = { ... 
  { ... 
    'ControlOut_Bus', ... 
    '', ... 
    '', ... 
    'Auto', ... 
    '-1', ... 
    '0', {... 
{'refFwXrpm', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'refFwYrpm', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'refFwZrpm', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'refFwSrpm', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
    } ...
  } ...
  { ... 
    'PlantState_Bus', ... 
    '', ... 
    '', ... 
    'Auto', ... 
    '-1', ... 
    '0', {... 
{'rollAng', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'pitchAng', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'yawAng', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'rollAngRate', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'pitchAngRate', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'yawAngRate', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
    } ...
  } ...
  { ... 
    'RefState_Bus', ... 
    '', ... 
    '', ... 
    'Auto', ... 
    '-1', ... 
    '0', {... 
{'refRollAng', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'refPitchAng', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
{'refYawAng', 1, 'double', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
    } ...
  } ...
  { ... 
    'WorkState_Bus', ... 
    '', ... 
    '', ... 
    'Auto', ... 
    '-1', ... 
    '0', {... 
{'FwState', 1, 'Enum:FW_State', 'real', 'Sample', 'Fixed', [], [], '', sprintf('work state for fly wheel;\n00000000 is ok;\n00000001 is x fly wheel error;\n00000010 is y fly wheel error;\n00000100 is z fly wheel error;\n00001000 is s fly wheel error;')}; ...
{'GyroState', 1, 'uint8', 'real', 'Sample', 'Fixed', [], [], '', ''}; ...
    } ...
  } ...
}'; 

if ~suppressObject 
    % Create bus objects in the MATLAB base workspace 
    Simulink.Bus.cellToObject(cellInfo) 
end 
